<%--
  Created by cofey on 16/11/20.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>维修记录</title>
</head>
<body>
<!-- 当前位置 -->
<div class="mainBox" style="height:auto!important;height:550px;min-height:550px;">
    <div class="navList" style="margin-top: 20px;">
        <ul class="tab">
            <li><a href="${ctx}/ap/fault/dialog?apDeviceId=${apDeviceId}">故障记录</a></li>
            <li><a href="#" class="selected">维修记录</a></li>
        </ul>
        <table width="100%" border="0" cellpadding="10" cellspacing="0" class="tableBasic">
            <thead>
            <tr>
                <th width="5%" align="center">序号</th>
                <th width="15%" align="center">AP索引</th>
                <th width="15%" align="center">IP地址</th>
                <th width="15%" align="center">MAC地址</th>
                <th width="12%" align="center">故障时间</th>
                <th width="12%" align="center">恢复时间</th>
                <th width="10%" align="center">检修人</th>
                <th width="10%" align="center">确认人</th>
            </tr>
            </thead>
            <tbody></tbody>
        </table>
        <form name="recoverSelectForm" action="${ctx}/ap/recover/content" method="post">
            <div class="g-pagebar"></div>
            <input type="hidden" name="apDeviceId" value="${apDeviceId}"/>
        </form>
    </div>
</div>
<script type="text/javascript">
    var config = null;
    jQuery(function ($) {
        var $container = $('.mainBox');
        var $pagebar = $container.find('.g-pagebar');
        var $tbodyContent = $container.find('table.tableBasic tbody');
        var $selectForm = $container.find("form[name=recoverSelectForm]");
        config = {
            pagebar: $pagebar,
            init: function () {
                config.loadRecoverContent();
            },
            loadRecoverContent: function () {
                $tbodyContent.empty();
                $pagebar.off();

                var optionsPost = {
                    success: function (data) {
                        $tbodyContent.html(data);
                    }
                };
                $selectForm.ajaxSubmit(optionsPost);
            }
        }

        config.init();
    });
</script>
</body>
</html>
